package com.datoucai.job;

import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class MyXxlJobHandler {

    @XxlJob("myXxlJobHandler")
    public void execute() throws Exception {
        // 任务执行逻辑
        System.out.println("MyXxlJobHandler is running.");
        XxlJobHelper.log("MyXxlJobHandler is running.");
        log.info("执行器测试成功");
    }
}
